package jmine.tec.executionlog.domain;

import java.util.Comparator;

/**
 * Comparator para ExecutionLogItem
 * @author lundberg
 */
public class ExecutionLogItemComparator implements Comparator<ExecutionLogItem> {
    /**
     * Compara 2 executionLogItem
     * @param i1 i1
     * @param i2 i2
     * @return {@link Comparator}
     */
    public int compare(ExecutionLogItem i1, ExecutionLogItem i2) {
        return (i1.getId() - i2.getId() < 0) ? -1
             : (i1.getId().equals(i2.getId()) ? 0 : 1);
    }
}
